1. Field of the Invention
The present invention generally relates to a distributed computer enterprise, and more particularly, to a system and method of providing locale-sensitive operations.
2. Description of the Related Art
In a conventional distributed computer environment, it is often assumed that a server and its clients are operating in the same locale. This assumption no longer holds true, in general, for e-business and Web applications. Managed nodes are often located across national boundaries. Thus, a typical managed network of the type described above may include offices located in numerous countries. Due to the worldwide acceptance of the Internet, a server is now more likely than ever to be physically located across a time zone from a remote user. It is also likely that the remote user will make a request that requires using cultural formatting conventions that are different from those of the server's locale. Conventionally, when a server processes a request from a remote user, the server will treat the request as if it occurred in the locale of the server. Without regard to the locale of the remote user, the server will impose its own local conventions when generating the results from the remote request. The remote user then receives the results of the request in a format that is unfamiliar to the user.
One area posing special problems with regard to request handling conventions is the Web services architecture. Web services architecture is rapidly emerging as the basis for the next generation of the eCommerce infrastructure. Web services are units of application logic providing data and services to other applications. Applications access Web services via standard Web protocols and data formats such as HTTP, XML, and SOAP, independent of how each Web service is implemented. Typically, Web services act as wrappers around server-side components of other distributed application platforms.
In the existing Web services architectures and implementations, there can be locale and time zone mismatches between a Web service requester (client) and a Web service provider (server). That is, the Web service provider freely imposes its locale and time zone in the locale and time zone-sensitive operations requested by the Web service requester.
FIG. 1 illustrates one example of the results from a Web service request made by a Web service requester to a remote Web service provider. In this example, a Spanish client 102 has invoked a locale-sensitive request on an American server 104. In the existing Web services architectures and implementations, the Web service provider always imposes its locale upon the Web service requester. Consequently, the Spanish client will receive results in the format and time zone of the American locale and not in the desired Spanish locale. The desired result in this instance includes a date and currency in the Spanish locale, and a sorted list. As shown, the desired result 106 of the Spanish client 102 was dramatically different from the actual result 108 returned by the American server 104. In the actual result, the server has translated the day and month from Spanish to English language and has also changed the day/date format to an American format. The American server changed the Spanish currency format by substituting commas for periods. And finally, the American server disregarded the tilde over the “n” in the Spanish word pina and provided an incorrect sorted list.
One solution to this problem is to follow a brute force strategy by passing the internationalization information (locales and time zone) explicitly as parameters in the relevant Web services requests. But, this strategy is error prone, cumbersome, and not practical. This strategy further requires modifications to the WSDL (Web services description language) definitions to accommodate the extra parameters, and consequently may not be practicable for existing business components.
A need therefore exists for a method and system for processing a Web service request without the locale and time zone mismatches between the Web service provider and the Web service requester.